#include "observer.h"

#include <iostream>
#include <memory>
#include <string>
#include <vector>
using namespace std;
void Test() {
  ConcreteSubjectInt* subject1 = new ConcreteSubjectInt;
  Observer1* observer1 = new Observer1(subject1);

  cout << "subject1->GetVal()=" << subject1->GetVal() << endl;
  subject1->SetVal(20);
  cout << "subject1->GetVal()=" << subject1->GetVal() << endl;
  subject1->SetVal(30);
  cout << "subject1->GetVal()=" << subject1->GetVal() << endl;
  delete subject1;
  delete observer1;
}
int main() {
  Test();

  return 0;
}